const express = require("express");
const app = express();
const getPlayList = require("./neteaseCloud/playlist.js");
const playListInfo = require("./neteaseCloud/playListInfo.js");
const serverConfig = {
    port: 8081
};
app.get("/neteaseCloud/playlist", (req, res) => {
    getPlayList(
        data => {
            res.send(data);
        },
        err => {
            res.send(err);
        },
        req.query.offset == undefined ? 0 : req.query.offset
    );
});
app.get("/neteaseCloud/playlistInfo", (req, res) => {
    playListInfo(
        data => {
            res.send(data);
        },
        err => {
            res.send(err);
        },
        req.query.id
    );
});
const server = app.listen(serverConfig.port, function () {
    let port = server.address().port;
    console.log("启动端口--", port);
});